﻿using System.Collections.Generic;
using System.Linq;

namespace Inovout.Security
{
    public partial class SystemUser : ISystemUser
    {
        public virtual IList<FormsUserCredential> FormsUserCredential
        {
            get
            {
                return UserCredentials.OfType<FormsUserCredential>().ToList<FormsUserCredential>() ?? new List<FormsUserCredential>();
            }
        }

        public virtual IList<OpenIdUserCredential> OpenIdUserCredential
        {
            get
            {
                return UserCredentials.OfType<OpenIdUserCredential>().ToList<OpenIdUserCredential>() ?? new List<OpenIdUserCredential>();
            }
        }

        public virtual IList<OAuthUserCredential> OAuthUserCredential
        {
            get
            {
                return UserCredentials.OfType<OAuthUserCredential>().ToList<OAuthUserCredential>() ?? new List<OAuthUserCredential>();
            }
        } 

        public override bool Equals(Inovout.Models.DataObject that)
        {
            return base.Equals(that);
        }
    }
}
